package com.example.hello.controllers;

import com.example.hello.api.SayService;
import com.netflix.discovery.EurekaClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.Map;

/**
 * Created by 徐翔 on 2016/10/12.
 */
@RestController
public class ConsumerController {

    @Autowired
    SayService sayService;

    @RequestMapping(value = "/say/{text}" ,method = RequestMethod.GET)
    public Map say(@PathVariable("text") String text) {
        return sayService.say(text);
    }
}
